// 引入mongoose模块
const mongoose = require('mongoose');

//创建文档的结构对象（Schema）
let AccountSchema = new mongoose.Schema({
    tittle : String,
    time : Date,
    type : Number,
    account : Number,
    remarks : String,
});

//创建Model对象, 将Schema发布为Model
let AccountModel = mongoose.model('accounts', AccountSchema);

//暴露Model对象
module.exports = AccountModel;
